package com.ddl.eurekaclient.responsibilityMode.elementary;

public abstract class AbstractPrepareFilter {

	private AbstractPrepareFilter nextPrepareFilter;

	public AbstractPrepareFilter(AbstractPrepareFilter nextPrepareFilter) {
		this.nextPrepareFilter = nextPrepareFilter;
	}

	public void doFilter(PreparationList preparationList, Study study) {
		prepare(preparationList);
		if (nextPrepareFilter == null) {
			study.study();
		} else {
			System.out.println(nextPrepareFilter.getClass());
			nextPrepareFilter.doFilter(preparationList, study);
		}
	}

	public abstract void prepare(PreparationList preparationList);

}
